From f67a7f79025ddd93f78aaa244eedf9e95b9e80f0 Mon Sep 17 00:00:00 2001 From: "kaf24@firebug.cl.cam.ac.uk" Date: Fri, 26 Aug 2005 11:00:14 +0000 Subject: [PATCH] Fix GDT allocation for SMP guests. Signed-off-by: Jun Nakajima --- linux-2.6-xen-sparse/arch/xen/i386/kernel/smpboot.c | 2 +- linux-2.6-xen-sparse/arch/xen/x86_64/kernel/smpboot.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/linux-2.6-xen-sparse/arch/xen/i386/kernel/smpboot.c b/linux-2.6-xen-sparse/arch/xen/i386/kernel/smpboot.c index 9e3efcd0ad..dd5eb7b100 100644 --- a/linux-2.6-xen-sparse/arch/xen/i386/kernel/smpboot.c +++ b/linux-2.6-xen-sparse/arch/xen/i386/kernel/smpboot.c @@ -853,7 +853,7 @@ static int __init do_boot_cpu(int apicid) atomic_set(&init_deasserted, 0); #if 1 - cpu_gdt_descr[cpu].address = __get_free_page(GFP_KERNEL); + cpu_gdt_descr[cpu].address = __get_free_page(GFP_KERNEL|__GFP_ZERO); BUG_ON(cpu_gdt_descr[0].size > PAGE_SIZE); cpu_gdt_descr[cpu].size = cpu_gdt_descr[0].size; printk("GDT: copying %d bytes from %lx to %lx\n", diff --git a/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/smpboot.c b/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/smpboot.c index 4245ac202d..035a358efa 100644 --- a/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/smpboot.c +++ b/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/smpboot.c @@ -739,7 +739,7 @@ static int __cpuinit do_boot_cpu(int cpu, int apicid) atomic_set(&init_deasserted, 0); #ifdef CONFIG_XEN - cpu_gdt_descr[cpu].address = __get_free_page(GFP_KERNEL); + cpu_gdt_descr[cpu].address = __get_free_page(GFP_KERNEL|__GFP_ZERO); BUG_ON(cpu_gdt_descr[0].size > PAGE_SIZE); cpu_gdt_descr[cpu].size = cpu_gdt_descr[0].size; memcpy((void *)cpu_gdt_descr[cpu].address, -- 2.30.2